<template>
    <div class="LeftImgStyles">
      <div class='contentBox'>
        <div v-if="props.title" class='title'>
         {{ props.title }}
        </div>
        <div class='boxBottom' :class="{[direction]:true}">
            <img :src="props.img" alt="" class='Img'/>
            <div class='rightText'>
              <div class='subTitle'>
                {{ props.subTitle }}
              </div>
              <div class='subText'>
                {{ props.subText }}
              </div>
            </div>
        </div>
      </div>
    </div>
</template>

<script setup lang="ts">
import { ref, computed } from 'vue'

const props = defineProps({
  direction:{
    type: String,
    default: 'default',
  },
  title:{
    type: String,
    default: '',
  },
  img:{
    type: String,
  },
  subTitle:{
    type: String,
  },
  subText:{
    type: String,
  }
})

</script>
<style scoped lang="scss">
.LeftImgStyles {
  padding: 64px 0 80px;
  text-align: center;
  // background: linear-gradient(0deg, #F6F5FF 0%, rgba(225, 221, 255, 0.20) 100%);
  
  .contentBox {
      max-width: 1360px;
      margin: 0 auto;
      .title {
        font-size: 40px;
        font-style: normal;
        font-weight: 700;
        line-height: 120%;
        color: #000;
        text-align: center;
        margin-bottom: 60px;
      }
      .boxBottom{
        display: flex;
        align-items: center;
        justify-content: space-between;
        .Img{
          flex: 1;
          max-width: 45vw;
        }
        .rightText{
          flex: 1;
          margin-left: 32px;
          .subTitle{
            font-size: 30px;
            margin-bottom: 20px;
            font-weight: 700;
            line-height: 120%; /* 28.8px */
          }
          .subText{
            font-size: 24px;
            line-height: 150%;
            font-weight: 400;
          }
        }
      }
      .reverse{
        flex-direction: row-reverse;
        .rightText{
          margin-left: 0;
          margin-right: 32px;
        }
      }
    }

    @media screen and (max-width: 1360px) and (min-width: 728px){
      padding-left: 15px;
      padding-right: 15px;
      box-sizing: border-box;
      .Img{
        width: 49vw;
      }
    }

    @media screen and (max-width: 728px){
      padding-left: 15px;
      padding-right: 15px;
      box-sizing: border-box;
      .boxBottom{
        flex-direction: column;
        .Img{
          width: 90vw;
        }
        .rightText{
          margin-top: 20px;
          margin-left: 0px !important ;
        }
      }

      .reverse{
        flex-direction: column !important;
        .rightText{
          margin-left: 0;
          margin-top: 20px;
          margin-right: 0px;
        }
      }
      
    }
}


</style>
